DBSend
DBSend
Send a query or a portion of a query to the data server long sessID ; is the session ID
char *text ; is a pointer to the query or query fragment
that you want to send
short len ; specifies the length of the character string.
DBAsyncParmBlkPtr asyncPB ; is a pointer to the asynchronous parameter
block
The DBSend function sends a query or a portion of a query to the data server. The data server appends this portion of the query to any portion you sent
send in any way, it does not insert any delimiter between fragments of queries
that you send to the data server. If you want a blank or a semicolon to be
included between query fragments, or if you want to use return characters to
divide the query into lines of text, you must include them in the character
string that you send with this function.
The data server does not execute the query until you call the DBExec function.
sessID is the session ID that was returned by the DBInit function. text is a pointer to the query or query fragment that you want to send to
the data server. The query or query fragment must be a character
string.
len specifies the length of the character string. If the len parameter has
a value of -1, then the character string is assumed to be NULL
terminated (that is, the string ends with a NULL byte); otherwise,
the len parameter specifies the number of bytes in the string.
asyncPB is a pointer to the asynchronous parameter block. If you do not want
to call the function asynchronously, set this parameter to NIL.
noErr (0) No error
rcDBError (-802) Error trying to send text
rcDBBadSessID -(806) Session ID is invalid
rcDBAsyncNotSupp (-809) The database extension does not support asynchronous
calls
rcDBPackNotInited (-813) The InitDBPack function has not yet been called